<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>爱狗狗 - 注册</title>
<link rel="stylesheet" type="text/css" href="resources/css/nav.css">
<style type="text/css">
body{
	background: #f5f5f5;

}
.wrap{
	width: 100%;
	height: 100%;
}
.registebg{
	background-color: #fff;
    width: 800px;
    margin: 10% auto;
    position: relative;
    min-height: 545px;
}
.logoimg{
	text-align: center;
}
.logoimg img{
	margin-top: 30px;
}
.registebg h1{
	font-size: 18px;
	text-align: center;
	margin-top: 20px;
}
.registebg h2{
	font-size: 18px;
	text-align: center;
	margin-top: 20px;
	color: red;
}
#registeBox{
    margin-top: 30px;
    text-align: center;
}
#username,#phoneNo,#password1,#password2{
	padding: 8px;
	height: 30px;
	font-size: 18px;
	width: 360px;
	margin-top: 20px;
}
#registebutton{
	margin-top: 20px;
	background-color: #3185e8;
	width: 380px;
	height: 45px;
	font-size: 16px;
	cursor:pointer;
	border:0;
}

</style>
</head>
<body>
<div class="wrap">
	<div class="registebg">
		<div class="logoimg"><img src="resources/images/logo.jpg" alt="logo"></div>
		<h1>爱狗狗账号注册</h1>
		<h2>${errorMsg}</h2>
		<form action="" method="post" id="registeBox" onsubmit="return check(this)">
			<ul>
				<li><input type="text" name="username" id="username" placeholder="请输入用户名"></li>
				<li><input type="password" name="password" id="password1"  maxlength="16" placeholder="请输入密码"></li>
				<li><input type="password" name="password2" id="password2" maxlength="16" placeholder="请再次确认密码"></li>
				<li><input type="submit" name="submit" value="立即注册"  id="registebutton"/></li>
			</ul>
		</form>
	</div>
</div>
<script>
function check(form) {   
	if (form.username.value == "") {    
		alert("用户名不能为空");    
		return false;    
	}    
	if (form.password1.value == "") {    
		alert("密码不能为空");    
		return false;    
	}
	if (form.password2.value == "") {       
		alert("确认密码不能为空"); 
	    return false;  
	}
	if (form.password1.value != form.password2.value) {    
		alert("两次输入密码不一致");    
		return false;    
	}  
	return true;    
}

</script>
</body>
</html>